define(["app", "angular", "services/BaseService"], function(app, angular) {
	
	var deps = ["$http", "BaseService"];
	
	function yokiUserResource($http, BaseService) {
        return initResource($http, BaseService.restfulUrl + "user/", BaseService.formHeader);
    }
	
	var postHeader = {
	        "Content-Type" : "application/x-www-form-urlencoded;charset=utf-8"
	};
	
	function initResource($http, preUrl,formHeader) {
        return {
        	save: function (userVo) {
				return $http.post(preUrl + "saveUser", angular.toJson(userVo));
			},
			deleteUser:function(userId){
                return $http.get(preUrl +userId+ "/deleteUser");
            },
            updateStatus:function(userId,status){
            	return $http.get(preUrl + "updateStatus", {
                    params: {
                    	userId: userId,
                    	status: status
                    }
                });
            },
            queryUserList: function (pageNo,pageSize,keyWord) {
                return $http.get(preUrl + "queryUserList", {
                    params: {
                        pageSize: pageSize || 10000,
                        pageNo: pageNo || 1,
                        keyWord:keyWord
                    }
                });
            },
        };
        
    }
	yokiUserResource.$inject = deps;
	app.lazy.factory("AddYokiUserResource", yokiUserResource);
});
